<?php

class Form_Design extends Form
{
    protected $_code = '';

    public function prepare()
    {

        $code = $this -> _code;

        list($spec, $elements) = Nuo::getTable('core@form') -> getFormSpec($this -> getCode());

        foreach ($elements as $ele)
        {
            $this -> addElement($ele);
        }

    }

    public function setCode($value)
    {
        $this -> _code = $value;
        return $this;
    }

    public function getCode()
    {
        return $this -> _code;
    }

}
